public class Plural implements Cloneable{
		double a;
		double b;
		public Plural(double real,double imaginary){
				this.a = real;
				this.b = imaginary;
		}
		public Plural(double real){
				this.a = real;
				this.b = 0.0;
		}
		public String toString(){
				if(a == 0){
						if(b == 0){
								return 0+"";
						}
						return b+"j";
				}else{
						if(b == 0){
								return a+"";
						}
						return a+"+"+b+"j";
				}
		}
		public Plural clone(){
				Plural p = null;
				try{
						p = (Plural)super.clone();
				}catch(CloneNotSupportedException e){
						e.printStackTrace();
				}
				return p;
		}
		public static void main(String[] args){
				System.out.println(new Plural(10));
		}
}
